import fetch from 'utils/fetch'

export default {
  // 获取兑换商品列表
  getEcGoodsList (params) {
    return fetch.post('/pc/exchangeCommodity/list', params)
  },
  // 兑换商品详情
  getEcGoodsDetails (params) {
    return fetch.post('/pc/exchangeCommodity/detail', params)
  },
  // 添加兑换商品
  addEcGoods (params) {
    return fetch.post('/pc/exchangeCommodity/add', params)
  },
  // 编辑兑换商品
  editEcGoods (params) {
    return fetch.post('/pc/exchangeCommodity/edit', params)
  },
  // 删除兑换商品
  delEcGoods (params) {
    return fetch.post('/pc/exchangeCommodity/del', params)
  },
  // 兑换商品上下架
  updateEcGoods (params) {
    return fetch.post('/pc/exchangeCommodity/isShelf', params)
  },
  // 删除兑换订单
  delEcGoodsOrder (params) {
    return fetch.post('/pc/exchangeOrder/del', params)
  },
  // 取消兑换订单
  cancelEcGoodsOrder (params) {
    return fetch.post('/pc/exchangeOrder/cancel', params)
  },
  // 发货
  shipEcGoods (params) {
    return fetch.post('/pc/exchangeOrder/send', params)
  },
  // 获取兑换订单列表
  getEcGoodsOrder (params) {
    return fetch.post('/pc/exchangeOrder/list', params)
  }
}
